package com.chen.auth.feign;

import com.chen.root.constant.SecurityCons;
import com.chen.root.oclass.dto.UserInfoDTO;
import com.chen.root.oclass.vo.LoginVO;
import com.chen.common.feign.constant.ServiceName;
import com.chen.root.base.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: ~龙~
 * @date: 2023/6/12 17:13
 **/
@FeignClient(value = ServiceName.FRAMEWORK_SERVICE,contextId = "remoteSysUserService")
public interface RemoteSysUserService {

    /**
     * 根据用户名称获取用户账号信息
     */
    @PostMapping(value = "/sysUser/info",headers = SecurityCons.HEADER_FROM_IN)
    R<UserInfoDTO> userInfo(@RequestBody LoginVO params);

    /**
     * 根据用户手机号获取用户账号信息
     */
    @PostMapping(value = "/sysUser/infoByPhone",headers = SecurityCons.HEADER_FROM_IN)
    R<UserInfoDTO> userInfoByPhone(@RequestBody LoginVO params);

}
